package com.dream.dao;



import com.dream.pojo.Bulletin;
import com.dream.pojo.BulletinIdInformation;

import java.util.List;

public interface BulletinDao {
    int addBulletin(Bulletin bulletin);
    List<Bulletin> list();
    Bulletin findById(long bulletinId);
    /**
     * 查询条数
     * @param bulletinTitle
     * @param userName
     * @param startTime
     * @param endTime
     * @return
     */
    long totalCount(String bulletinTitle,String userName,String startTime,String endTime);

    /**
     * 查询每页的数据
     * @param bulletinTitle
     * @param userName
     * @param startTime
     * @param endTime
     * @param pageIndex
     * @param pageSize
     * @return
     */
    List<BulletinIdInformation> list(String bulletinTitle, String userName, String startTime, String endTime, long pageIndex, long pageSize);

    /**
     * 点击数增1
     * @param bulletinId
     * @return
     */
    int updateRedaCount(long bulletinId);

    int deleteById(Long bulletinId);
    int updateBulletin(Bulletin bulletin);
}
